<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>AVWX - Account</title>

    <link rel="apple-touch-icon" sizes="180x180" href="/static/favicons/apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="/static/favicons/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="/static/favicons/favicon-16x16.png">
    <link rel="manifest" href="/static/favicons/site.webmanifest">
    <link rel="mask-icon" href="/static/favicons/safari-pinned-tab.svg" color="#5bbad5">
    <meta name="msapplication-TileColor" content="#2d89ef">
    <meta name="theme-color" content="#ffffff">

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
    <script src="https://kit.fontawesome.com/51107b8707.js" crossorigin="anonymous"></script>
    {% block headers %}
    {% endblock %}
</head>

<body>

    <nav class="container-fluid">
        <div class="row justify-content-between align-items-center">
            <div class="col">
                <a href="https://avwx.rest">
                    <img src="/static/img/avwx-icon-32-white.png" alt="AVWX navigation icon">
                </a>
                &nbsp;
                <h6 class="d-inline"><a href="/">Account Management</a></h6>
            </div>
            <div class="col-xs-auto">
            {% if call_or_get(current_user.is_authenticated) %}
                <a href="{{ url_for('manage') }}">{{ current_user.username or current_user.email }}</a>
                &nbsp; | &nbsp;
                <a href="{{ url_for('user.logout') }}">Log Out</a>
            {% else %}
                <a href="{{ url_for('user.register') }}">Create Account</a>
                &nbsp; | &nbsp;
                <a href="{{ url_for('user.login') }}">Log In</a>
            {% endif %}
            </div>
        </div>
    </nav>

    <div class='container content'>
        {% block flash_messages %}
            {%- with messages = get_flashed_messages(with_categories=true) -%}
                {% if messages %}
                    {% for category, message in messages %}
                        {% if category=='error' %}
                            {% set category='danger' %}
                        {% endif %}
                        <div class="alert alert-{{category}}">{{ message|safe }}</div>
                    {% endfor %}
                {% endif %}
            {%- endwith %}
        {% endblock %}
        {% block content %}
        {% endblock %}
    </div>

    <footer>
        Copyright © 2021 duPont Technologies LLC
    </footer>

    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>
</body>

</html>